package com.softcits.autotask;

import java.util.List;
import java.util.Map;

import org.quartz.SchedulerException;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.jdbc.core.JdbcTemplate;

import com.softcits.autotask.service.AutoTaskService;
import com.softcits.autotask.service.QuartzService;

public class AutoTaskApplication {

    public static void main(String[] args) {
        AnnotationConfigApplicationContext ctx = 
                new AnnotationConfigApplicationContext(AutoTaskConf.class, DBConfig.class);
        AutoTaskService ats = ctx.getBean(AutoTaskService.class);
        QuartzService qs = ctx.getBean(QuartzService.class);
        String jobName = "job100";
        String triggerName = "trigger100";
        String group = "group100";
        
        try {
//            qs.deleteJob(jobName, triggerName, group);
//            
//            qs.testQuartz01(jobName, triggerName, group);
            qs.resume(jobName, triggerName, group);
        } catch (SchedulerException e) {
            e.printStackTrace();
        }
        //ctx.close();

    }

}
